package com.jamie.jvm.lock;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class FairLockDemo {

    public static void main(String[] args) {
        // 创建一个公平锁
        Lock fairSync = new ReentrantLock(true);
        // 创建一个非公平锁
        Lock nonfairSync = new ReentrantLock(false);
    }

}
